﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;

namespace BLL.Services.Users.Listing
{
    public class UserListing
    {
        public UserListing()
        {
            Users = new List<User>();
        }

        public UserFilter Filter { get; set; }

        public int Page { get; set; }

        public int TotalPages { get; set; }

        public int Size { get; set; }

        public int Direction { get; set; }

        public string Column { get; set; }

        public List<User> Users { get; set; }

        public class User
        {
            public int UserId { get; set; }

            public string Email { get; set; }

            public string Login { get; set; }

            public DateTime Date { get; set; }

            [Display(Name = "Last Update Date")]
            public string LastUpdateDate
            {
                get
                {
                    return Date.ToShortDateString();
                }
            }
        }
    }
}